package com.xsh.gls.service;

import com.xsh.gls.pojo.Customer;
import com.xsh.gls.pojo.Salesman;
import com.xsh.gls.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface UserService {
   boolean insert(User user, Salesman salesman)throws Exception;
   User queryUserById(Integer id)throws Exception;
   User queryUserByUserName(String userName)throws Exception;
   int updateByPrimaryKey(User user);

   int updateByPrimaryKeySelective(User user);

   List<User> selectByTypeID(Integer typeid);
   User queryUserByPhone(String phone)throws Exception;
   boolean add(User user)throws Exception;

   List<User> queryAll(String userName,String sAddress,Integer typeId)throws Exception;
   boolean updatePwdById(String password,Integer id);
    User selectUserById(Integer id)throws Exception;
    User selectByUserNameOld(String userName, String oldUserName);

    User selectByPhoneOld(String phone,String oldPhone);

    boolean updateById(User user,Salesman salesman)throws Exception;

    boolean delUser(Integer id)throws Exception;

    boolean updatePhone1(User user, Salesman salesman, int stausId)throws Exception;
    boolean updatePhone2(User user, Customer customer, int stausId)throws Exception;
}
